#include <iostream>
#include <stdio.h>
using namespace std;
typedef long long ll;
const ll MAXN=1e6+7;
ll res[MAXN];
void Init() {
	res[3]=0;
	ll k;
	for (ll i=4; i<MAXN; ++i) {
		k=(i-2)/2;
		res[i]=res[i-1]+(i%2==1? k*(k+1) : k*k);
	}
} 
int main() {
	Init();
	ll ask;
	while (cin>>ask) {
		if (ask<3) break;
		cout<<res[ask]<<endl;
	}
	return 0;
} 
